package com.constructor;

import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo {
	/**
	 * 构造器方式注入
	 */
	@Test
	public void test1() {
		BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
		A a = (A) factory.getBean("a");
		a.a();
	}
}
